package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationVo;
import com.zzyl.vo.TimeReservationCountVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CustomerReservationMapper {
    Integer getCancelledCount(@Param("id")Long id, @Param("begin")LocalDateTime begin, @Param("end")LocalDateTime end);

    List<TimeReservationCountVo> getTimeReservationCount(List<LocalDateTime> timeList);

    void addReservation(Reservation reservation);

    Page<ReservationVo> pageQuery(Integer status,Long id);

    void cancel(Integer id);

    void deleteExpireData();

    void updateExpireData();

    List<TimeReservationCountVo> getTimeReservationCount2(@Param("begin")LocalDateTime begin, @Param("end") LocalDateTime end);
}
